-- GENERATED SPELL FOR [Rancid Mushroom] --


function spell0_22250(pUnit, Event) --@Spore Cloud,Self--
pUnit:FullCastSpellOnTarget(38652,pUnit)
pUnit:RegisterEvent('Sorts_22250', 20000, 1)
end

function spell1_22250(pUnit, Event) --@Spore Cloud,Self--
pUnit:FullCastSpellOnTarget(38653,pUnit)
pUnit:RegisterEvent('Sorts_22250', 20000, 1)
end

function Sorts_22250(pUnit, Event)
local choix_sorts_22250 = math.random(0, 1)
if choix_sorts_22250 == 0 then
pUnit:RegisterEvent('spell0_22250', 1, 1)
end
if choix_sorts_22250 == 1 then
pUnit:RegisterEvent('spell1_22250', 1, 1)
end
end

function mob22250_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22250', math.random(1500, 3000), 1)
end

function mob22250_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22250_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22250_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22250, 1, 'mob22250_Action')
RegisterUnitEvent(22250, 2, 'mob22250_Leave')
RegisterUnitEvent(22250, 3, 'mob22250_Kill')
RegisterUnitEvent(22250, 4, 'mob22250_Die')
